{layout '../Public/sideForm.latte'}
{block title}修改员工{/block}
{block private_css}
    <style>
        .delBtn, #addBtn{
            display:block;
        }

        .delBtn{
            float:left;
            margin-left:10px;
        }

        .delBtn:hover, #addBtn a:hover{
            cursor:pointer;
            text-decoration:none;
        }

        .depAndSta{
            clear:both;
            float:left;
            overflow:hidden;
            font-size:12px;
            line-height:35px;
            border:1px solid #ddd;
            padding:0 10px;
            border-radius:20px;
            margin-top:5px;
        }

        .combindText{
            float:left;
            margin:0 !important;
        }

        .right-exchange{
            margin-top:5px;
            margin-left:5px;
            width:90px;
            line-height:25px;
            color:#fff;
            text-align:center;
            background-color:#009AE2;
            border-radius:50px;
            display:block;
            float:left;
            cursor:pointer;
        }

        .right-exchange:hover{
            color:#fff;
            text-decoration:none;
        }
    </style>
{/block}
{block private_js}
    <script>
        init.ready(function () {

            window.isIsInputStatusEqLeave = function () {

                var statusVal = $(".input-status:checked").val();

                if (statusVal == 3) return "将员工设为离职，系统会自动停止该员工正在执行的任务，确定吗？";
                return false;
            };

        });
    </script>
{/block}

{block content}
    <form id="formArticle" class="stdform mform" data-confirm-name="isIsInputStatusEqLeave" method="post" action="" onsubmit="return false">
        <table cellpadding="0" cellspacing="0" border="0" id="frmtable" class="formtable">
            <thead>
            <tr>
                <td><label>用户</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group input-auto-find">
                            <input type="text" class="smallinput" autocomplete="off" value="{$staff['fullName']}" disabled/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>部门</label></td>
                <td style="float: left;">
                    <div class="control-group ">
                        <div class="field input-group">
                            <div style="overflow: hidden;">
                                <select id="department" name="department" style="float: left;">
                                    {$departmentOption|noescape}
                                </select>
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>职位</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            <select name="station" id="myStation">
                                {foreach $stations as $k=>$v}
                                    <option {if $staff['station']==$v["id"]}selected{/if} value="{$v["id"]}">{$v["names"]}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>手机号</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <input type="text" id="frm_phone" class="smallinput" name="phone" value="{$staff['phone']}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>微信号</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <input type="text" id="frm_wx" class="smallinput" name="wx" value="{$staff['wx']}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>QQ号</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <input type="text" id="frm_qq" class="smallinput" name="qq" value="{$staff['qq']}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>邮箱</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <input type="text" id="frm_email" class="smallinput" name="email" value="{$staff['email']}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>备注</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            <textarea name="memo" class="smallinput">{$staff['memo']}</textarea>
                        </div>
                    </div>
                </td>
            </tr>

            <tr>
                <td><label>状态</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            {if $c_status==1}
                                {foreach $statusMemo as $status=>$memo}
                                    <label class='radio'><input class="input-status" name='status' {if $status==$staff['status']}checked{/if} type="radio" value='{$status}'>{$memo}</label>
                                {/foreach}
                            {else}
                                <span style="color:red">企业已邀请,等待用户确认</span>
                            {/if}
                        </div>
                    </div>
                </td>
            </tr>

            </thead>
        </table>
    </form>
{/block}